<?php 
include('config.php');
include_once('connection/connection.php');
?>
<?php 
if(isset($_POST['num_habit']) && $_POST['num_habit']!=0 and $_POST['num_habit']!='')
{
?>
<table width="191" height="56"  border="0" cellpadding="0" bgcolor="#eeeeee" id="table7">
	<tr>
		<td width="202" height="22" align="center" bgcolor="#cccccc">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Unlisted Habitation Name</font></td>
			<!--<td width="202" height="22" align="center" bgcolor="#EEEEEE">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Longitude</font></td>
			<td width="202" height="22" align="center" bgcolor="#EEEEEE">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Latitude</font></td>-->
	</tr>
	<?php
	//echo $check=$_GET['check'];
$no=$_POST['num_habit'];
if($no>0) 
{
for($i=1; $i<=$no; $i++)
{
?>
	<tr>
		<td width="202" align="center">
	  <input type="text" name="un_habit<?php echo $i;?>" id="un_habit<?php echo $i;?>" size="20" class="txt"></td>
	  <!--<td width="202" align="center">
	  <input type="text" name="un_longitude<?php //echo $i;?>" id="un_longitude<?php //echo $i;?>" size="20" class="txt" onBlur="float1(this)"></td>
	  <td width="202" align="center">
	  <input type="text" name="un_latitude<?php //echo $i;?>" id="un_latitude<?php //echo $i;?>" size="20" class="txt" onBlur="float1(this)"></td>-->
	</tr>	
<?php 
}
}
?>
<input type="hidden" name="counthabit" id="counthabit" value="<?php echo $no;?>"/>
</table>
<?php }?>



<?php
if(isset($_POST['mono_total']) && $_POST['mono_total']!=0 && $_POST['mono_total']!=''){
?>
	<table border="0" width="680" id="table16" cellpadding="0">
        <tr>
			<td width="12%" bgcolor="#EEEEEE"></td>
			<td width="12%" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000">Location</font></td>
			<td width="12%" align="center" height="16" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000">Latitude</font></td>
			<td width="12%" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000">Longitude</font></td>
			 <td width="28%" align="center" height="16" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000"> Status</font></td>
			<td width="7%" align="center" height="16" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000"> Discharge (lpm)</font></td>
            <td width="12%" align="center" height="16" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000"> Head (m)</font></td>
            <td width="12%" align="center" height="16" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000"> Power Rating (in HP)</font></td>
		</tr>
		<?php
			$mono_total=$_POST['mono_total'];
			for($i=1; $i<=$mono_total; $i++)
			{
		?> 
		<tr align="center">
			<td><input type="text" name="mono_id<?php echo $i;?>" id="mono_id<?php echo $i;?>" size="18" class="txt5" value="mono<?php echo $i;?>" readonly /></td>
			<td>
			  <input type="text" name="mono_location<?php echo $i;?>" id="mono_location<?php echo $i;?>" size="18" class="txt5" />
			</td>
			<td width="12%">
			  <input type="text" name="mono_latitude<?php echo $i;?>" id="mono_latitude<?php echo $i;?>" size="18" class="txt5" />
			</td>
		    <td width="12%">
		      <input type="text" name="mono_longitude<?php echo $i;?>" id="mono_longitude<?php echo $i;?>" size="18" class="txt5" />
		    </td>
		    <td width="7%"><font color="#000000" size="2">
			<!--
		      <input type="radio" name="mono_status<?php echo $i;?>" id="mono_status<?php echo $i;?>" value="operational" checked="checked" onclick="setEnable21(this.value,<?php echo $i;?>)" />
Operational
<input type="radio" name="mono_status<?php echo $i;?>" id="mono_status<?php echo $i;?>" value="standby" onclick="setReadOnly21(this.value,<?php echo $i;?>)" />
Standby</font>
-->

<select name="mono_status<?php echo $i;?>" id="mono_status<?php echo $i;?>">
	  <option  value="0">Select Status</option>
	  <option value="operational">Operational</option>
	  <option value="nonoperational">Non Operational</option>
	   <option value="standby">Standby</option>
	  </select>
	  </font>
</td>
	      <td width="12%"><input type="text" name="mono_discharge<?php echo $i;?>" id="mono_discharge<?php echo $i;?>" size="18" class="txt5" onblur="float(this)"></td>
          <td width="12%"><input type="text" name="mono_head<?php echo $i;?>" id="mono_head<?php echo $i;?>" size="18" class="txt5" onblur="float(this)"></td>
          <td width="21%"><input type="text" name="mono_power<?php echo $i;?>" id="mono_power<?php echo $i;?>" size="18" class="txt5" onblur="float(this)"></td>
		</tr>
		<?php } ?>
						<tr>
						<td height="2" colspan="8" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000"></font></td>
						</tr>      
	<input type="hidden" name="monocount" id="monocount" value="<?php echo $mono_total;?>" />
	</table>	

 <?php } ?>
 
 
 
 <?php
if(isset($_POST['sub_total']) && $_POST['sub_total']!=0 && $_POST['sub_total']!=''){
?>
<table border="0" width="680" id="table16" cellpadding="0">
  <tr>
    <td width="14%" bgcolor="#EEEEEE"></td>
	<td width="7%" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000">Location</font></td>
			<td width="6%" align="center" height="16" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000">Latitude</font></td>
			<td width="6%" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000">Longitude</font></td>
    <td width="28%" align="center" height="16" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000"> Status</font></td>
    <td width="18%" align="center" height="16" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000"> Discharge (lpm)</font></td>
    <td width="17%" align="center" height="16" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000"> Head (m)</font></td>
    <td width="23%" align="center" height="16" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000"> Power Rating (in HP)</font></td>
  </tr>
  <?php
			$sub_total=$_POST['sub_total'];
			for($i=1; $i<=$sub_total; $i++)
			{
		?>
  <tr align="center">
    <td><input type="text" name="sub_id<?php echo $i;?>" id="sub_id<?php echo $i;?>" size="18" class="txt5" value="Sub<?php echo $i;?>" readonly /></td>
    <td><input type="text" name="sub_location<?php echo $i;?>" id="sub_location<?php echo $i;?>" size="18" class="txt5" /></td>
			<td width="6%"><input type="text" name="sub_latitude<?php echo $i;?>" id="sub_latitude<?php echo $i;?>" size="18" class="txt5" /></td>
		    <td width="6%"><input type="text" name="sub_longitude<?php echo $i;?>" id="sub_longitude<?php echo $i;?>" size="18" class="txt5" /></td>
	<td width="28%"><font color="#000000" size="2">
	<!--
      <input type="radio" name="sub_status<?php echo $i;?>"id="sub_status<?php echo $i;?>" value="operational" checked="checked" onclick="setEnable2(this.value,<?php echo $i;?>)" />
      Operational
      <input type="radio" name="sub_status<?php echo $i;?>"id="sub_status<?php echo $i;?>" value="standby" onclick="setReadOnly2(this.value,<?php echo $i;?>)" />
      Standby-->
	  <select name="sub_status<?php echo $i;?>" id="sub_status<?php echo $i;?>">
	  <option  value="0">Select Status</option>
	  <option value="operational">Operational</option>
	  <option value="nonoperational">Non Operational</option>
	   <option value="standby">Standby</option>
	  </select>
	  </font>
    </td>
    <td width="18%"><input type="text" name="sub_discharge<?php echo $i;?>" id="sub_discharge<?php echo $i;?>" size="18" class="txt5" onblur="float(this)"/></td>
    <td width="17%"><input type="text" name="sub_head<?php echo $i;?>" id="sub_head<?php echo $i;?>" size="18" class="txt5" onblur="float(this)" /></td>
    <td width="23%"><input type="text" name="sub_power<?php echo $i;?>" id="sub_power<?php echo $i;?>" size="18" class="txt5" onblur="float(this)" /></td>
  </tr>
  <?php } ?>
  
  <input type="hidden" name="submcount" id="submcount" value="<?php echo $sub_total;?>" />
</table>
 <?php } ?>







<?php
if(isset($_POST['sp_total']) && $_POST['sp_total']!=0 && $_POST['sp_total']!=''){
?>
	<table border="0" width="680" id="table16" cellpadding="0">
        <tr>
			<td width="14%" bgcolor="#EEEEEE"></td>
			<td width="7%" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000">Location</font></td>
			<td width="6%" align="center" height="16" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000">Latitude</font></td>
			<td width="6%" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000">Longitude</font></td>
			<td width="26%" align="center" height="16" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000"> Status</font></td>
			<td width="17%" align="center" height="16" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000"> Discharge (lpm)</font></td>
            <td width="17%" align="center" height="16" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000"> Head (m)</font></td>
            <td width="26%" align="center" height="16" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000"> Power Rating (in HP)</font></td>
		</tr>
		<?php
			$sp_total=$_POST['sp_total'];
			for($i=1; $i<=$sp_total; $i++)
			{
		?> 
		<tr align="center">
			<td><input type="text" name="sp_id<?php echo $i;?>" id="sp_id<?php echo $i;?>" size="18" class="txt5" value="Sp<?php echo $i;?>" readonly /></td>
			<td><input type="text" name="sp_location<?php echo $i;?>" id="sp_location<?php echo $i;?>" size="18" class="txt5" /></td>
			<td width="6%"><input type="text" name="sp_latitude<?php echo $i;?>" id="sp_latitude<?php echo $i;?>" size="18" class="txt5" /></td>
		    <td width="6%"><input type="text" name="sp_longitude<?php echo $i;?>" id="sp_longitude<?php echo $i;?>" size="18" class="txt5" /></td>
			<td width="26%">
				<font color="#000000" size="2">
				<!--
                <input type="radio" name="sp_status<?php echo $i;?>"id="sp_status<?php echo $i;?>" value="operational" checked="checked" onclick="setEnable212(this.value,<?php echo $i;?>)"> 
                Operational
				<input type="radio" name="sp_status<?php echo $i;?>"id="sp_status<?php echo $i;?>" value="standby" onclick="setReadOnly212(this.value,<?php echo $i;?>)"> Standby -->
				<select name="sp_status<?php echo $i;?>" id="sp_status<?php echo $i;?>">
	  <option  value="0">Select Status</option>
	  <option value="operational">Operational</option>
	  <option value="nonoperational">Non Operational</option>
	   <option value="standby">Standby</option>
	  </select>
	  </font>
			  </font>
		  </td>
		  <td width="17%"><input type="text" name="sp_discharge<?php echo $i;?>" id="sp_discharge<?php echo $i;?>" size="18" class="txt5" onblur="float(this)"></td>
          <td width="17%"><input type="text" name="sp_head<?php echo $i;?>" id="sp_head<?php echo $i;?>" size="18" class="txt5" onblur="float(this)"></td>
          <td width="26%"><input type="text" name="sp_power<?php echo $i;?>" id="sp_power<?php echo $i;?>" size="18" class="txt5" onblur="float(this)"></td>
		</tr>
		<?php } ?>
						 
<input type="hidden" name="spcount" id="spcount" value="<?php echo $sp_total;?>" />
</table>	

	<?php } ?>
	
	
	
	
	<?php
if(isset($_POST['centi_total']) && $_POST['centi_total']!=0 && $_POST['centi_total']!=''){
?>
	<table border="0" width="680" id="table16" cellpadding="0">
        <tr>
			<td width="12%" bgcolor="#EEEEEE"></td>
			<td width="7%" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000">Location</font></td>
			<td width="6%" align="center" height="16" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000">Latitude</font></td>
			<td width="6%" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000">Longitude</font></td>
			<td width="27%" align="center" height="18" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000"> Status</font></td>
			<td width="18%" align="center" height="18" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000"> Discharge (lpm)</font></td>
            <td width="17%" align="center" height="18" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000"> Head (m)</font></td>
            <td width="26%" align="center" height="18" bgcolor="#EEEEEE"><font style="font-size: 8.5pt" face="Verdana" color="#000000"> Power Rating (in HP)</font></td>
		</tr>
		<?php
			$centi_total=$_POST['centi_total'];
			for($i=1; $i<=$centi_total; $i++)
			{
		?>  
		<tr align="center">
			<td><input type="text" name="centi_id<?php echo $i;?>" id="centi_id<?php echo $i;?>" size="18" class="txt5" value="centi<?php echo $i;?>" readonly /></td>
			<td><input type="text" name="centi_location<?php echo $i;?>" id="centi_location<?php echo $i;?>" size="18" class="txt5" /></td>
			<td width="6%"><input type="text" name="centi_latitude<?php echo $i;?>" id="centi_latitude<?php echo $i;?>" size="18" class="txt5" /></td>
		    <td width="6%"><input type="text" name="centi_longitude<?php echo $i;?>" id="centi_longitude<?php echo $i;?>" size="18" class="txt5" /></td>
			<td width="27%">
				<font color="#000000" size="2">
				<!--
                <input type="radio" name="centi_status<?php echo $i;?>"id="centi_status<?php echo $i;?>" value="operational" checked="checked" onclick="setEnable211(this.value,<?php echo $i;?>)"> 
                Operational
				<input type="radio" name="centi_status<?php echo $i;?>"id="centi_status<?php echo $i;?>" value="standby" onclick="setReadOnly211(this.value,<?php echo $i;?>)"> Standby  -->
				<select name="centi_status<?php echo $i;?>" id="centi_status<?php echo $i;?>">
	  <option  value="0">Select Status</option>
	  <option value="operational">Operational</option>
	  <option value="nonoperational">Non Operational</option>
	   <option value="standby">Standby</option>
	  </select>
	  </font>
			  </font>
		  </td>
		  <td width="18%"><input type="text" name="centi_discharge<?php echo $i;?>" id="centi_discharge<?php echo $i;?>" size="18" class="txt5" onblur="float(this)"></td>
          <td width="17%"><input type="text" name="centi_head<?php echo $i;?>" id="centi_head<?php echo $i;?>" size="18" class="txt5" onblur="float(this)"></td>
          <td width="26%"><input type="text" name="centi_power<?php echo $i;?>" id="centi_power<?php echo $i;?>" size="18" class="txt5" onblur="float(this)"></td>
		</tr> 
		<?php } ?>
						
	<input type="hidden" name="centicount" id="centicount" value="<?php echo $centi_total;?>" />
</table>	

<?php } ?>



<?php
if(isset($_POST['ohsr_total']) && $_POST['ohsr_total']!=0 && $_POST['ohsr_total']!=''){
?>		
                   <table border="0" width="651" id="table16" cellpadding="0">
                        <tr>
                          <td width="108" align="center" bgcolor="#EEEEEE">&nbsp;</td>
                          <td width="108" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Location</font></td>
                          <td width="108" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Latitude</font></td>
                          <td width="108" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Longitudet</font></td>
                          <td width="108" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Total Capacity (kl)</font></td>
                          <td width="97" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">In SC/ST Bastis</font></td>
                        </tr>
                        <?php
					$ohsr_total=$_POST['ohsr_total'];
					for($i=1; $i<=$ohsr_total; $i++)
					{
					?>
                        <tr>
                          <td align="center"><input type="text" name="ohsr_id<?php echo $i;?>" id="ohsr_id<?php echo $i;?>" size="18" class="txt5" value="OHSR<?php echo $i;?>" readonly />&nbsp;&nbsp;</td>
                          <td align="center">
                            <input type="text" name="ohsr_location<?php echo $i;?>" id="ohsr_location<?php echo $i;?>" size="18" class="txt5" />                          </td>
                          <td align="center"><input type="text" name="ohsr_latitude<?php echo $i;?>" id="ohsr_latitude<?php echo $i;?>" size="18" class="txt5" /></td>
                          <td align="center">
                            <input type="text" name="ohsr_longitude<?php echo $i;?>" id="ohsr_longitude<?php echo $i;?>" size="18" class="txt5" />                          </td>
                          <td align="center"><input type="text" name="ohsr_capacity<?php echo $i;?>" id="ohsr_capacity<?php echo $i;?>" size="18" class="txt5" onblur="float(this)" /></td>
                          <td align="center">
                            <input name="ohsr_sc_st<?php echo $i;?>" id="ohsr_sc_st<?php echo $i;?>" type="radio" value="Yes" checked="checked" />
                            <font style="font-size: 8.5pt" face="Arial" color="#000000">Yes</font>
                            <input name="ohsr_sc_st<?php echo $i;?>" id="ohsr_sc_st<?php echo $i;?>" type="radio" value="NO" />
                            <font style="font-size: 8.5pt" face="Arial" color="#000000">No</font></td>
                        </tr>
						<?php } ?>
						<tr>
						<td height="2" colspan="6" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000"></font></td>
						</tr>					 
					<input type="hidden" name="ohsrcount" id="ohsrcount" value="<?php echo $ohsr_total;?>" />
</table>
               

<?php }?>



<?php
if(isset($_POST['glr_total']) && $_POST['glr_total']!=0 && $_POST['glr_total']!=''){
?>
				
                   <table border="0" width="650" id="table16" cellpadding="0">
                        <tr>
                          <td width="108" align="center" bgcolor="#EEEEEE">&nbsp;</td>
                          <td width="108" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Location</font></td>
                          <td width="108" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Latitude</font></td>
                          <td width="108" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Longitudet</font></td>
                          <td width="108" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Total Capacity (kl)</font></td>
                          <td width="96" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">In SC/ST Bastis</font></td>
                        </tr>
                        <?php
					$glr_total=$_POST['glr_total'];
					for($i=1; $i<=$glr_total; $i++)
					{
					?>
                        <tr>
                          <td align="center"><input type="text" name="glr_id<?php echo $i;?>" id="glr_id<?php echo $i;?>" size="18" class="txt5" value="GLR<?php echo $i;?>" readonly />&nbsp;&nbsp;</td>
						  <td align="center">
                            <input type="text" name="glr_location<?php echo $i;?>" id="glr_location<?php echo $i;?>" size="18" class="txt5" />                          </td>
                          <td align="center"><input type="text" name="glr_latitude<?php echo $i;?>" id="glr_latitude<?php echo $i;?>" size="18" class="txt5" /></td>
                          <td align="center">
                            <input type="text" name="glr_longitude<?php echo $i;?>" id="glr_longitude<?php echo $i;?>" size="18" class="txt5" />                          </td>
                          <td align="center"><input type="text" name="glr_capacity<?php echo $i;?>" id="glr_capacity<?php echo $i;?>" size="18" class="txt5" onblur="float(this)" /></td>
                          <td align="center">
                            <input name="glr_sc_st<?php echo $i;?>" id="glr_sc_st<?php echo $i;?>" type="radio" value="Yes" checked="checked" />
                            <font style="font-size: 8.5pt" face="Arial" color="#000000">Yes</font>
                            <input name="glr_sc_st<?php echo $i;?>" id="glr_sc_st<?php echo $i;?>" type="radio" value="NO" />
                            <font style="font-size: 8.5pt" face="Arial" color="#000000">No</font></td>
                        </tr>
						<?php } ?>
						
                      <input type="hidden" name="glrcount" id="glrcount" value="<?php echo $glr_total;?>" />
</table>
                  

<?php }?>



                 <?php
if(isset($_POST['cwr_total']) && $_POST['cwr_total']!=0 && $_POST['cwr_total']!=''){
?>

				      <table border="0" width="660" id="table16" cellpadding="0">
                        <tr>
                          <td width="108" align="center" bgcolor="#EEEEEE">&nbsp;</td>
                          <td width="108" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Location</font></td>
                          <td width="108" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Latitude</font></td>
                          <td width="108" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Longitudet</font></td>
                          <td width="108" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Total Capacity (kl)</font></td>
                          <td width="103" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">In SC/ST Bastis</font></td>
                        </tr> 
						<?php
					$cwr_total=$_POST['cwr_total'];
					for($i=1; $i<=$cwr_total; $i++)
					{
					?>                    
                        <tr>
                          <td height="22" align="center"><input type="text" name="cwr_id<?php echo $i;?>" id="cwr_id<?php echo $i;?>" size="18" class="txt5" value="CWR<?php echo $i;?>" readonly />&nbsp;&nbsp;
						  </td>
						  <td align="center">
                            <input type="text" name="cwr_location<?php echo $i;?>" id="cwr_location<?php echo $i;?>" size="18" class="txt5" />                          </td>
                          <td align="center"><input type="text" name="cwr_latitude<?php echo $i;?>" id="cwr_latitude<?php echo $i;?>" size="18" class="txt5" /></td>
                          <td align="center">
                            <input type="text" name="cwr_longitude<?php echo $i;?>" id="cwr_longitude<?php echo $i;?>" size="18" class="txt5" />                          </td>
                          <td align="center"><input type="text" name="cwr_capacity<?php echo $i;?>" id="cwr_capacity<?php echo $i;?>" size="18" class="txt5" onblur="float(this)" /></td>
                          <td align="center">
                            <input name="cwr_sc_st<?php echo $i;?>" id="cwr_sc_st<?php echo $i;?>" type="radio" value="Yes" checked="checked" />
                            <font style="font-size: 8.5pt" face="Arial" color="#000000">Yes</font>
                            <input name="cwr_sc_st<?php echo $i;?>" id="cwr_sc_st<?php echo $i;?>" type="radio" value="NO" />
                            <font style="font-size: 8.5pt" face="Arial" color="#000000">No</font></td>
                        </tr>
						<?php } ?>
						
                      <input type="hidden" name="cwrcount" id="cwrcount" value="<?php echo $cwr_total;?>">
</table>
                

<?php } ?>


<?php
if(isset($_POST['glsr_total'])&& $_POST['glsr_total']!=0 && $_POST['glsr_total']!=''){
?>
				
                     <table border="0" width="657" id="table16" cellpadding="0">
                        <tr>
                          <td width="108" align="center" bgcolor="#EEEEEE">&nbsp;</td>
                          <td width="108" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Location</font></td>
                          <td width="108" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Latitude</font></td>
                          <td width="108" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Longitudet</font></td>
                          <td width="108" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Total Capacity (kl)</font></td>
                          <td width="103" align="center" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">In SC/ST Bastis</font></td>
                        </tr>
                        <?php
					$glsr_total=$_POST['glsr_total'];
					for($i=1; $i<=$glsr_total; $i++)
					{
					?>
                        <tr>
                          <td align="center"><input type="text" name="glsr_id<?php echo $i;?>" id="glsr_id<?php echo $i;?>" size="18" class="txt5" value="GLSR<?php echo $i;?>" readonly />&nbsp;&nbsp;</td>
						  <td align="center">
                            <input type="text" name="glsr_location<?php echo $i;?>" id="glsr_location<?php echo $i;?>" size="18" class="txt5" />                          </td>
                          <td align="center"><input type="text" name="glsr_latitude<?php echo $i;?>" id="glsr_latitude<?php echo $i;?>" size="18" class="txt5" /></td>
                          <td align="center">
                            <input type="text" name="glsr_longitude<?php echo $i;?>" id="glsr_longitude<?php echo $i;?>" size="18" class="txt5" />                          </td>
                          <td align="center"><input type="text" name="glsr_capacity<?php echo $i;?>" id="glsr_capacity<?php echo $i;?>" size="18" class="txt5" onblur="float(this)" /></td>
                          <td align="center">
                            <input name="glsr_sc_st<?php echo $i;?>" id="glsr_sc_st<?php echo $i;?>" type="radio" value="Yes" checked="checked" />
                            <font style="font-size: 8.5pt" face="Arial" color="#000000">Yes</font>
                            <input name="glsr_sc_st<?php echo $i;?>" id="glsr_sc_st<?php echo $i;?>" type="radio" value="NO" />
                            <font style="font-size: 8.5pt" face="Arial" color="#000000">No</font></td>
                        </tr>
					<?php } ?>
					
                      <input type="hidden" name="glsrcount" id="glsrcount" value="<?php echo $glsr_total;?>" />
</table>                  
               

<?php }?>





	<?php
if(isset($_POST['psp_total']) && $_POST['psp_total']!=0 && $_POST['psp_total']!=''){
?>
		
		<table border="0" width="703" id="table11" cellpadding="0" bgcolor="#EEEEEE">
		<tr>
			<td height="27" align="center" width="16%" bgcolor="#EEEEEE">
				<address>
					<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Taps / PSP</font>
				</address>
				<address>
		  <font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Nos. </font></address>		  </td>
			<td height="27" align="center" width="16%" bgcolor="#EEEEEE">
				<font face="Verdana" style="font-size: 8.5pt" color="#990000">
				Location</font>			</td>
			<td height="27" align="center" width="16%" bgcolor="#EEEEEE">
				<address>
				<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Latitude</font>
				</address>		  </td>
			<td align="center" width="16%" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Longitude</font></td>
			<td align="center" width="12%" bgcolor="#EEEEEE"><address>
			<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Attached with</font>
			</address>
			  <address>
              <font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">(GLR)</font>
		    </address></td>
			<td height="27" align="center" width="12%" bgcolor="#EEEEEE">
				<address>
					<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Attached with CWT</font></address>
				<address>
					<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">(Cattle water trough)</font></address>		  </td>
		    <td align="center" width="12%" bgcolor="#EEEEEE"><font face="Verdana" style="font-size: 8.5pt" color="#990000">In SC/ST Basti</font></td>
		</tr>
		<?php
	$psp_total=$_POST['psp_total'];
	for($i=1; $i<=$psp_total; $i++)
	{
	?>		
		<tr>
			<td width="16%" align="center">
		  <input type="text" name="psp_taps<?php echo $i; ?>" id="psp_taps<?php echo $i;?>" size="18" class="txt5" onBlur="numeric(this)"></td>
			<td width="16%" align="center">
		  <input type="text" name="psp_loc<?php echo $i; ?>" id="psp_loc<?php echo $i;?>" size="18" class="txt5">		  </td>
			<td width="16%" align="center">
				<font style="font-size: 8.5pt" face="Arial" color="#000000"><!--<input type="radio" name="psp_glr<?php //echo $i; ?>" id="psp_glr<?php //echo $i;?>" value="NO" onClick="formshow_glr(this.name,this.value,<?php //echo $psp_total; ?>)">No-->
			  </font>		  <input type="text" name="psp_latitude<?php echo $i;?>" id="psp_latitude<?php echo $i;?>" size="18" class="txt5" /></td>
			<td width="16%" align="center"><input type="text" name="psp_longitude<?php echo $i;?>" id="psp_longitude<?php echo $i;?>" size="18" class="txt5" /></td>
			<td width="12%" align="center"><font style="font-size: 8.5pt" face="Arial" color="#000000">
			  <input type="radio" name="psp_glr<?php echo $i;?>" id="radio" value="YES" />
			  Yes
              <!--<input type="radio" name="psp_glr<?php //echo $i;?>" id="psp_glr<?php //echo $i;?>" value="YES" onClick="formshow_glr(this.name,this.value,<?php //echo $psp_total; ?>)">Yes-->
              <input type="radio" name="psp_glr<?php echo $i; ?>" id="radio" value="NO" />
            No </font></td>
			<td align="center">
				<font style="font-size: 8.5pt" face="Arial" color="#000000">
				<input type="radio" name="psp_cwt<?php echo $i;?>" id="psp_cwt<?php echo $i;?>" value="YES">Yes
				<!--<input type="radio" name="psp_cwt<?php //echo $i;?>" id="psp_cwt<?php //echo $i;?>" value="YES" onClick="formshow_cwt(this.value,<?php //echo $i; ?>)">Yes-->
		  	  <input type="radio" name="psp_cwt<?php echo $i;?>" id="psp_cwt<?php echo $i;?>" value="NO">No
			  <!--<input type="radio" name="psp_cwt<?php //echo $i;?>" id="psp_cwt<?php //echo $i;?>" value="NO" onClick="formshow_cwt(this.value,<?php //echo $i; ?>)">No-->
			  </font></td>
			  
		    <td align="center"><font style="font-size: 8.5pt" face="Arial" color="#000000">
				<input type="radio" name="sc_st<?php echo $i;?>" id="sc_st<?php echo $i;?>" value="YES">Yes
		  	  <input type="radio" name="sc_st<?php echo $i;?>" id="sc_st<?php echo $i;?>" value="NO">No</font></td>
		</tr>
		<!--<tr>
		<td></td>
		<td></td>
		<td><div id="glr<?php //echo $i;?>" class="hideme"> <table border="0" width="100%" id="table15" cellpadding="0">
								<tr>
									<td width="32%" align="center" bgcolor="#EEEEEE" colspan="2">
										<font style="font-size: 8.5pt" face="Verdana" color="#990000">
										Nos.</font></td>
									<td width="32%" align="center" bgcolor="#EEEEEE" rowspan="2">
										<font style="font-size: 8.5pt" face="Verdana" color="#990000">
										Location</font></td>
								</tr>
								<tr>
									<td width="32%" align="center" bgcolor="#EEEEEE">
										<font style="font-size: 8.5pt" face="Verdana" color="#990000">
										Total</font></td>
									<td width="32%" align="center" bgcolor="#EEEEEE">
										<font style="font-size: 8.5pt" face="Verdana" color="#990000">
										In SC / ST Bastis</font></td>
								</tr>
								<tr>
									<td width="13%" align="center">
										<input type="text" name="glr_total<?php //echo $i; ?>" id="glr_total<?php //echo $i; ?>"  size="20" class="txt5" onBlur="numeric(this)">
									</td>
									<td width="13%" align="center">
										<input type="text" name="glr_sc_st<?php //echo $i; ?>" id="glr_sc_st<?php echo $i; ?>" size="20" class="txt5" onBlur="numeric(this)">																	 									</td>
										<td width="13%" align="center">
										<input type="text" name="glr_loc<?php //echo $i; ?>" id="glr_loc<?php //echo $i; ?>" size="20" class="txt5">																	 									</td>
								</tr>
						</table> </div></td>
		<td colspan="2"><div id="cwt<?php //echo $i;?>" class="hideme"> <table border="0" width="100%" id="table15" cellpadding="0">
								<tr>
									<td width="32%" align="center" bgcolor="#EEEEEE" colspan="2">
										<font style="font-size: 8.5pt" face="Verdana" color="#990000">
										Nos.</font>									</td>
									<td width="32%" align="center" bgcolor="#EEEEEE" rowspan="2">
										<font style="font-size: 8.5pt" face="Verdana" color="#990000">
										Location</font>									</td>
								</tr>
								<tr>
									<td width="32%" align="center" bgcolor="#EEEEEE">
										<font style="font-size: 8.5pt" face="Verdana" color="#990000">
										Total</font>									</td>
									<td width="32%" align="center" bgcolor="#EEEEEE">
										<font style="font-size: 8.5pt" face="Verdana" color="#990000">
										In SC / ST Bastis</font>									</td>
								</tr>
								<tr>
									<td width="13%" align="center">
										<input type="text" name="cwt_total<?php //echo $i; ?>" id="cwt_total<?php //echo $i; ?>" size="20" class="txt5" onBlur="numeric(this)">									</td>
									<td width="13%" align="center">
										<input type="text" name="cwt_sc_st<?php //echo $i; ?>" id="cwt_sc_st<?php //echo $i; ?>" size="20" class="txt5" onBlur="numeric(this)">																	 									</td>
										<td width="13%" align="center">
										<input type="text" name="cwt_loc<?php //echo $i; ?>" id="cwt_loc<?php //echo $i; ?>" size="20" class="txt5">																	 									</td>
								</tr>
						</table></div></td>
		</tr>-->
		<?php 
		}
		?>	
		<input type="hidden" name="pspcount" id="pspcount" value="<?php echo $psp_total;?>">
		</table>

<?php }?>





<?php
if(isset($_POST['num_source']) && $_POST['num_source']!=0 and $_POST['num_source']!=''){
?>
<table border="0" width="794" id="table4" cellspacing="1" cellpadding="0" bgcolor="#eeeeee">

				<tr>
					<td colspan="8"><span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				
				<tr>
				<td align="center" width="73" bgcolor="#cccccc">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">Source</font></td>
						<td align="center" width="73" bgcolor="#cccccc">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">Location</font></td>
						<td align="center" width="73" bgcolor="#cccccc">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">Latitude</font></td>
						<td align="center" width="73" bgcolor="#cccccc">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">Longitude</font></td>
					<td colspan="2" align="center" bgcolor="#cccccc" width="73">
                        <font face="Verdana" style="font-size: 8.5pt" color="#990000">Current Status</font></td>
						
					<td colspan="2" align="center" bgcolor="#cccccc" width="73">
						<font style="font-size: 8.5pt" face="Verdana" color="#990000">
						Yield Min (KL/day)</font></td>
					<td colspan="2" align="center" bgcolor="#cccccc" width="73">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">
						Yield Max (KL/day)</font></td>
					<td colspan="2" align="center" bgcolor="#cccccc" width="73">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">
						Water Table Min (m)</font></td>
					<td colspan="2" align="center" bgcolor="#cccccc" width="73">
						<font style="font-size: 8.5pt" face="Verdana" color="#990000">
						Water Table Max (m)</font></td>
			    </tr>	
				<?php
$no=$_POST['num_source'];
for($i=1; $i<=$no; $i++)
{
if($i%2==0)
{
$color="#DCDCDC";
}else{
$color="#F8F8FF";
}
?>

				<tr bgcolor="<?php echo $color;?>">
				<td width="73" align="center"><font style="font-size: 8.5pt" face="Verdana" color="#000000">
						<select size="1" name="source<?php echo $i;?>" id="source<?php echo $i;?>" class="txt">
						<option selected value="0">Select</option>
						<?php 
						foreach($sources as $key=>$val)
						{
		   					echo "<option value=\"$val\">$val</option>";
						}
						?>
				  </select></font></td>
				  <td width="73" align="center">
				  <input type="text" name="source_location<?php echo $i;?>" id="source_location<?php echo $i;?>" size="10" class="txt5" ></td>
				  <td width="73" align="center">
				  <input type="text" name="source_latitude<?php echo $i;?>" id="source_latitude<?php echo $i;?>" size="10" class="txt5" onblur="float(this)"></td>
				  <td width="73" align="center">
				  <input type="text" name="source_longitude<?php echo $i;?>" id="source_longitude<?php echo $i;?>" size="10" class="txt5" onblur="float(this)"></td>
				  <td height="20" colspan="2" align="center" width="73">
                  <font color="#000000" style="font-size:13px; font-family:Verdana, Arial, Helvetica, sans-serif">
                  <input type="radio" name="current_status<?php echo $i;?>" id="current_status<?php echo $i;?>" value="operation" checked onClick="setEnable22(this.value,<?php echo $i; ?>)">OP
				  <input type="radio" name="current_status<?php echo $i;?>" id="current_status<?php echo $i;?>" value="defunct" onClick="setReadOnly22(this.value,<?php echo $i; ?>)">DE</font></td>
				  
					<td colspan="2" align="center" width="73">
				  <input type="text" name="yield_min<?php echo $i;?>" id="yield_min<?php echo $i;?>" size="5"  onblur="float(this)"></td>
					<td colspan="2" align="center">
				  <input type="text" name="yield_max<?php echo $i;?>" id="yield_max<?php echo $i;?>" size="5"  onblur="float(this)"></td>
					<td colspan="2" align="center" width="73">
				  <input type="text" name="water_table_min<?php echo $i;?>" id="water_table_min<?php echo $i;?>" size="5" onblur="float(this)"></td>
					<td colspan="2" align="center">
				  <input type="text" name="water_table_max<?php echo $i;?>" id="water_table_max<?php echo $i;?>" size="5" onblur="float(this)"></td>
		        </tr>
				<tr>
				  <td height="20" colspan="14" align="center" bgcolor="<?php echo $color;?>">
				  <table width="684" border="0">
  <tr>
    <td width="70"><font style="font-size: 8.5pt" face="Verdana" color="#000000">(Parameter)</font></td>
    <td width="37"><font style="font-size: 8.5pt" face="Verdana" color="#990000">Ph</font></td>
    <td width="39"><input type="text" name="para_ph<?php echo $i;?>" id="para_ph<?php echo $i;?>" size="5" onBlur="float(this)"></td>
    <td width="38"><font style="font-size: 8.5pt" face="Verdana" color="#990000"> TDS</font></td>
    <td width="39"><input type="text" name="para_tds<?php echo $i;?>" id="para_tds<?php echo $i;?>" size="5" onBlur="float(this)"></td>
    <td width="36"><font style="font-size: 8.5pt" face="Verdana" color="#990000"> F</font></td>
    <td width="39"><input type="text" name="para_f<?php echo $i;?>" id="para_f<?php echo $i;?>" size="5" onBlur="float(this)"></td>
    <td width="28"><font style="font-size: 8.5pt" face="Verdana" color="#990000"> Cl</font></td>
    <td width="34"><input type="text" name="para_cl<?php echo $i;?>" id="para_cl<?php echo $i;?>" size="5" onBlur="float(this)"></td>
    <td width="35"><font style="font-size: 8.5pt" face="Verdana" color="#990000">NO3</font></td>
    <td width="34"><input type="text" name="para_no3<?php echo $i;?>" id="para_no3<?php echo $i;?>" size="5" onBlur="float(this)"></td>
    <td width="88"><font style="font-size: 8.5pt" face="Verdana" color="#990000">Date(Testing)</font></td>
    <td width="113"><input type="text" name="testing_date<?php echo $i;?>" id="testing_date<?php echo $i;?>" size="15" class="txt5" readonly></td>
    <td><small><a href="javascript:showCal('Calendar<?php echo $i;?>')" onclick="showID()" id="my<?php echo $i;?>"><img src="images/caldr.jpg" title="calender" border="0"></a></small></td>
  </tr>
</table>				  </td>
  </tr>
				<tr>
				  <td height="20" colspan="14" align="center">&nbsp;</td>
  </tr>
				
				
				<?php }?>
				<input type="hidden" name="sourcecount" id="sourcecount" value="<?php echo $no;?>"/>	
</table>
<?php 
} 
?>


<?php
if(isset($_POST['hp_no']) && $_POST['hp_no']!=0 and $_POST['hp_no']!=''){
?>
<table border="0" width="764" id="table4" cellspacing="1" cellpadding="0" bgcolor="#eeeeee">

				<tr>
					<td colspan="8"><span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				
				<tr>
				<td align="center" width="101" bgcolor="#cccccc">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">Habitation Name</font></td>
						<td align="center" width="60" bgcolor="#cccccc">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">Type</font></td>
						<td align="center" width="60" bgcolor="#cccccc"><font face="Verdana" style="font-size: 8.5pt" color="#990000">Location</font></td>
						<td align="center" width="60" bgcolor="#cccccc">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">Latitude</font></td>
						<td align="center" width="60" bgcolor="#cccccc">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">Longitude</font></td>
					<td align="center" bgcolor="#cccccc" style="width:100px">
                        <font face="Verdana" style="font-size: 8.5pt" color="#990000">Functional Status</font></td>
						
					<td colspan="2" align="center" bgcolor="#cccccc">
						<font style="font-size: 8.5pt" face="Verdana" color="#990000">
						Operational Status</font></td>
					<td colspan="2" align="center" bgcolor="#cccccc">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">
						Quality Status</font></td>
					<td colspan="2" align="center" bgcolor="#cccccc">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">
						Yield</font></td>
					<td colspan="2" align="center" bgcolor="#cccccc">
						<font style="font-size: 8.5pt" face="Verdana" color="#990000">
						Seasonal Fluctu-<br />ation in Yield</font></td>
			        
			        <td align="center" bgcolor="#cccccc" width="58"><font style="font-size: 8.5pt" face="Verdana" color="#990000">Water Table Fluctu-<br />ation (m) Min</font></td>
			        <td align="center" bgcolor="#cccccc" width="72"><font style="font-size: 8.5pt" face="Verdana" color="#990000">Water Table Fluctu-<br />ation (m) Max</font></td>
					<td align="center" bgcolor="#cccccc" width="58"><font style="font-size: 8.5pt" face="Verdana" color="#990000">Non Functional Status</font></td>
				</tr>	
				<?php
$no=$_POST['hp_no'];
$vill_id=$_POST['vill_id'];

for($i=1; $i<=$no; $i++)
{
if($i%2==0)
{
$color="#DCDCDC";
}else{
$color="#F8F8FF";
}
?>

				<tr bgcolor="<?php echo $color;?>">
				<td width="101" align="center"><font style="font-size: 8.5pt" face="Verdana" color="#000000">
				<?php
				$q="SELECT DISTINCT habitation_code, habitation_name from tbl_lookup_location where village_id='$vill_id' order by habitation_code";
				$result=mysql_query($q);
				?>
						<select size="1" name="habitation_name<?php echo $i;?>" id="habitation_name<?php echo $i;?>" style="width:100px" class="txt">
						<option selected value="0">====</option>
						<?php 
						 while(list($id, $name)=mysql_fetch_array($result))
		                  {
		   					echo "<option value=\"$id,$name\">$name</option>";
							
						  }
						?>
				  </select></font></td>
				  <td width="60" align="center">
				  <select size="1" name="habit_type<?php echo $i;?>" id="habit_type<?php echo $i;?>" style="width:50px" class="txt">
						<option selected value="0">==</option>
						<option value="MH">MH</option>
						<option value="OH">OH</option>
				  </select></td>
				  <td width="60" align="center"><input type="text" name="location<?php echo $i;?>" id="location<?php echo $i;?>" size="5" onblur="float(this)"></td>
				  <td width="60" align="center">
				  <input type="text" name="latitude<?php echo $i;?>" id="latitude<?php echo $i;?>" size="2" onblur="float(this)"></td>
				  <td width="60" align="center">
				  <input type="text" name="longitude<?php echo $i;?>" id="longitude<?php echo $i;?>" size="2" onblur="float(this)"></td>
				  <td height="20" align="center">
				  <select size="1" name="function_status<?php echo $i;?>" id="function_status<?php echo $i;?>" style="width:60px" class="txt" onchange="disEnb(<?php echo $i;?>)">
						<option  value="0">==</option>
						<option selected value="FUNCTIONAL">Functional</option>
						<option value="NOT FUNCTIONAL">Not Functional</option>
				  </select></td>				  
					<td colspan="2" align="center" width="40">
				  <select size="1" name="opration_status<?php echo $i;?>" id="opration_status<?php echo $i;?>" style="width:60px" class="txt">
						<option selected value="0">==</option>
						<option value="In Use">IN USE</option>
						<option value="Out of Use">OUT USE</option>
				  </select></td>
					<td colspan="2" align="center" width="40">
				  <select size="1" name="quality_status<?php echo $i;?>" id="quality_status<?php echo $i;?>" style="width:60px" class="txt">
						<option selected value="0">==</option>
						<option value="Potable">Potable</option>
						<option value="Not Potable">Non potable</option>
				  </select></td>
					<td colspan="2" align="center" width="40">
				  <select size="1" name="yield<?php echo $i;?>" id="yield<?php echo $i;?>" style="width:60px" class="txt">
						<option selected value="0">==</option>
						<option value="Good">Good</option>
						<option value="Satisfactory">Satisfactory</option>
						<option value="Poor">Poor</option>
				  </select></td>
					<td colspan="2" align="center" width="40">
				  <select size="1" name="seasonal_flunctuation<?php echo $i;?>" id="seasonal_flunctuation<?php echo $i;?>" style="width:60px" class="txt">
						<option selected value="0">==</option>
						<option value="No Change">No Change</option>
						<option value="Slight Change">Slight Change</option>
						<option value="Drastic Change">Drastic Change</option>
				  </select></td>
		           
		            <td align="center" width="58"> <input type="text" name="fluctuation_min<?php echo $i;?>" id="fluctuation_min<?php echo $i;?>" size="1" onblur="float(this)"></td>
		            <td align="center" width="72"> <input type="text" name="fluctuation_max<?php echo $i;?>" id="fluctuation_max<?php echo $i;?>" size="1" onblur="float(this)"></td>
					 <td align="center" width="58"><select size="1" name="Repairable<?php echo $i;?>" id="Repairable<?php echo $i;?>" style="width:60px" class="txt" disabled="disabled">
						<option selected value="0">==</option>
						<option value="Repairable">Repairable</option>
						<option value="Non Repairable">Non Repairable</option>
						<option value="Abondoned">Abondoned</option>
				  </select></td>
				</tr>
				<tr>
				  <td height="20" colspan="17" align="center" bgcolor="<?php echo $color;?>">
				  <table width="684" border="0">
  <tr>
    <td width="37"><font style="font-size: 8.5pt" face="Verdana" color="#990000">Ph</font></td>
    <td width="39"><input type="text" name="ph<?php echo $i;?>" id="ph<?php echo $i;?>" size="5" onBlur="float(this)"></td>
    <td width="38"><font style="font-size: 8.5pt" face="Verdana" color="#990000"> TDS</font></td>
    <td width="39"><input type="text" name="tds<?php echo $i;?>" id="tds<?php echo $i;?>" size="5" onBlur="float(this)"></td>
    <td width="36"><font style="font-size: 8.5pt" face="Verdana" color="#990000"> F</font></td>
    <td width="39"><input type="text" name="f<?php echo $i;?>" id="f<?php echo $i;?>" size="5" onBlur="float(this)"></td>
    <td width="28"><font style="font-size: 8.5pt" face="Verdana" color="#990000"> Cl</font></td>
    <td width="34"><input type="text" name="cl<?php echo $i;?>" id="cl<?php echo $i;?>" size="5" onBlur="float(this)"></td>
    <td width="35"><font style="font-size: 8.5pt" face="Verdana" color="#990000">NO3</font></td>
    <td width="34"><input type="text" name="no3<?php echo $i;?>" id="no3<?php echo $i;?>" size="5" onBlur="float(this)"></td>
    <td width="88"><font style="font-size: 8.5pt" face="Verdana" color="#990000">Date(Testing)</font></td>
    <td width="113"><input type="text" name="HPtesting_date<?php echo $i;?>" id="HPtesting_date<?php echo $i;?>" size="15" class="txt5" readonly></td>
    <td><small><a href="javascript:showCal('HPCalendar<?php echo $i;?>')" onclick="showHPID()" id="my_hp<?php echo $i;?>"><img src="images/caldr.jpg" title="calender" border="0"></a></small></td>
    <td><font style="font-size: 8.5pt" face="Verdana" color="#990000">Remarks</font></td>
    <td><input type="text" size="5" name="remarks<?php echo $i;?>" id="remarks<?php echo $i;?>" disabled="disabled"/></td>
  </tr>
</table>				  </td>
  </tr>
				<tr>
				  <td height="20" colspan="17" align="center">&nbsp;</td>
  </tr>
				
				
				<?php }?>
				<input type="hidden" name="sourcecount" id="sourcecount" value="<?php echo $no;?>"/>	
</table>
<?php 
} 
?>

<?php
if(isset($_POST['sp_no']) && $_POST['sp_no']!=0 and $_POST['sp_no']!=''){
?>
<table border="0" width="764" id="table4" cellspacing="1" cellpadding="0" bgcolor="#eeeeee">

				<tr>
					<td colspan="8"><span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				
				<tr>
				<td align="center" width="101" bgcolor="#cccccc">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">Habitation Name</font></td>
						<td align="center" width="60" bgcolor="#cccccc">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">Type</font></td>
						<td align="center" width="60" bgcolor="#cccccc"><font face="Verdana" style="font-size: 8.5pt" color="#990000">Location</font></td>
						<td align="center" width="60" bgcolor="#cccccc">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">Latitude</font></td>
						<td align="center" width="60" bgcolor="#cccccc">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">Longitude</font></td>
					<td align="center" bgcolor="#cccccc" style="width:100px">
                        <font face="Verdana" style="font-size: 8.5pt" color="#990000">Functional Status</font></td>
						
					<td colspan="2" align="center" bgcolor="#cccccc">
						<font style="font-size: 8.5pt" face="Verdana" color="#990000">
						Operational Status</font></td>
					<td colspan="2" align="center" bgcolor="#cccccc">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">
						Quality Status</font></td>
					<td colspan="2" align="center" bgcolor="#cccccc">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">
						Yield</font></td>
					<td colspan="2" align="center" bgcolor="#cccccc">
						<font style="font-size: 8.5pt" face="Verdana" color="#990000">
						Seasonal Fluctu-<br />ation in Yield</font></td>
			       
			        <td align="center" bgcolor="#cccccc" width="58"><font style="font-size: 8.5pt" face="Verdana" color="#990000">Water Table Fluctu-<br />ation (m) Min</font></td>
			        <td align="center" bgcolor="#cccccc" width="72"><font style="font-size: 8.5pt" face="Verdana" color="#990000">Water Table Fluctu-<br />ation (m) Max</font></td>
					 <td align="center" bgcolor="#cccccc" width="58"><font style="font-size: 8.5pt" face="Verdana" color="#990000">Non Functional Status</font></td>
				</tr>	
				<?php
$sp_no=$_POST['sp_no'];
$sp_vill_id=$_POST['vill_id'];

for($i=1; $i<=$sp_no; $i++)
{
if($i%2==0)
{
$color="#DCDCDC";
}else{
$color="#F8F8FF";
}
?>

				<tr bgcolor="<?php echo $color;?>">
				<td width="101" align="center"><font style="font-size: 8.5pt" face="Verdana" color="#000000">
				<?php
				$q="SELECT DISTINCT habitation_code, habitation_name from tbl_lookup_location where village_id='$sp_vill_id' order by habitation_code";
				$result=mysql_query($q);
				?>
						<select size="1" name="sp_habitation_name<?php echo $i;?>" id="sp_habitation_name<?php echo $i;?>" style="width:100px" class="txt">
						<option selected value="0">====</option>
						<?php 
						 while(list($id, $name)=mysql_fetch_array($result))
		                  {
		   					echo "<option value=\"$id,$name\">$name</option>";
						  }
						?>
				  </select></font></td>
				  <td width="60" align="center">
				  <select size="1" name="sp_habit_type<?php echo $i;?>" id="sp_habit_type<?php echo $i;?>" style="width:50px" class="txt">
						<option selected value="0">==</option>
						<option value="MH">MH</option>
						<option value="OH">OH</option>
				  </select></td>
				  <td width="60" align="center"><input type="text" name="sp_location<?php echo $i;?>" id="sp_location<?php echo $i;?>" size="5" onblur="float(this)"></td>
				  <td width="60" align="center">
				  <input type="text" name="sp_latitude<?php echo $i;?>" id="sp_latitude<?php echo $i;?>" size="2" onblur="float(this)"></td>
				  <td width="60" align="center">
				  <input type="text" name="sp_longitude<?php echo $i;?>" id="sp_longitude<?php echo $i;?>" size="2" onblur="float(this)"></td>
				  <td height="20" align="center">
				  <select size="1" name="sp_function_status<?php echo $i;?>" id="sp_function_status<?php echo $i;?>" style="width:60px" class="txt" onchange="disEnbsp(<?php echo $i;?>)">
						<option  value="0">==</option>
						<option selected value="FUNCTIONAL">Functional</option>
						<option value="NOT FUNCTIONAL">Not Functional</option>
				  </select></td>				  
					<td colspan="2" align="center" width="40">
				  <select size="1" name="sp_opration_status<?php echo $i;?>" id="sp_opration_status<?php echo $i;?>" style="width:60px" class="txt">
						<option selected value="0">==</option>
						<option value="In Use">IN USE</option>
						<option value="Out of Use">OUT USE</option>
				  </select></td>
					<td colspan="2" align="center" width="40">
				  <select size="1" name="sp_quality_status<?php echo $i;?>" id="sp_quality_status<?php echo $i;?>" style="width:60px" class="txt">
						<option selected value="0">==</option>
						<option value="Potable">Potable</option>
						<option value="Not Potable">Non potable</option>
				  </select></td>
					<td colspan="2" align="center" width="40">
				  <select size="1" name="sp_yield<?php echo $i;?>" id="sp_yield<?php echo $i;?>" style="width:60px" class="txt">
						<option selected value="0">==</option>
						<option value="Good">Good</option>
						<option value="Satisfactory">Satisfactory</option>
						<option value="Poor">Poor</option>
				  </select></td>
					<td colspan="2" align="center" width="40">
				  <select size="1" name="sp_seasonal_flunctuation<?php echo $i;?>" id="sp_seasonal_flunctuation<?php echo $i;?>" style="width:60px" class="txt">
						<option selected value="0">==</option>
						<option value="No Change">No Change</option>
						<option value="Slight Change">Slight Change</option>
						<option value="Drastic Change">Drastic Change</option>
				  </select></td>
		           
		            <td align="center" width="58"> <input type="text" name="sp_fluctuation_min<?php echo $i;?>" id="sp_fluctuation_min<?php echo $i;?>" size="1" onblur="float(this)"></td>
		            <td align="center" width="72"> <input type="text" name="sp_fluctuation_max<?php echo $i;?>" id="sp_fluctuation_max<?php echo $i;?>" size="1" onblur="float(this)"></td>
					 <td align="center" width="58"><select size="1" name="sp_Repairable<?php echo $i;?>" id="sp_Repairable<?php echo $i;?>" style="width:60px" class="txt" disabled="disabled">
						<option selected value="0">==</option>
						<option value="Repairable">Repairable</option>
						<option value="Non Repairable">Non Repairable</option>
						<option value="Abondoned">Abondoned</option>
				  </select></td>
				</tr>
				<tr>
				  <td height="20" colspan="17" align="center" bgcolor="<?php echo $color;?>">
				  <table width="684" border="0">
  <tr>
    <td width="37"><font style="font-size: 8.5pt" face="Verdana" color="#990000">Ph</font></td>
    <td width="39"><input type="text" name="sp_ph<?php echo $i;?>" id="sp_ph<?php echo $i;?>" size="5" onBlur="float(this)"></td>
    <td width="38"><font style="font-size: 8.5pt" face="Verdana" color="#990000"> TDS</font></td>
    <td width="39"><input type="text" name="sp_tds<?php echo $i;?>" id="sp_tds<?php echo $i;?>" size="5" onBlur="float(this)"></td>
    <td width="36"><font style="font-size: 8.5pt" face="Verdana" color="#990000"> F</font></td>
    <td width="39"><input type="text" name="sp_f<?php echo $i;?>" id="sp_f<?php echo $i;?>" size="5" onBlur="float(this)"></td>
    <td width="28"><font style="font-size: 8.5pt" face="Verdana" color="#990000"> Cl</font></td>
    <td width="34"><input type="text" name="sp_cl<?php echo $i;?>" id="sp_cl<?php echo $i;?>" size="5" onBlur="float(this)"></td>
    <td width="35"><font style="font-size: 8.5pt" face="Verdana" color="#990000">NO3</font></td>
    <td width="34"><input type="text" name="sp_no3<?php echo $i;?>" id="sp_no3<?php echo $i;?>" size="5" onBlur="float(this)"></td>
    <td width="88"><font style="font-size: 8.5pt" face="Verdana" color="#990000">Date(Testing)</font></td>
    <td width="113"><input type="text" name="SPtesting_date<?php echo $i;?>" id="SPtesting_date<?php echo $i;?>" size="15" class="txt5" readonly></td>
    <td><small><a href="javascript:showCal('SPCalendar<?php echo $i;?>')" onclick="showSPID()" id="my_sp<?php echo $i;?>"><img src="images/caldr.jpg" title="calender" border="0" /></a></small></td>
	<td><font style="font-size: 8.5pt" face="Verdana" color="#990000">Remarks</font></td>
    <td><input type="text" size="5" name="sp_remarks<?php echo $i;?>" id="sp_remarks<?php echo $i;?>" disabled="disabled"></td>
  </tr>
</table>				  </td>
  </tr>
				<tr>
				  <td height="20" colspan="17" align="center">&nbsp;</td>
  </tr>
				
				
				<?php }?>
				<input type="hidden" name="sourcecount" id="sourcecount" value="<?php echo $sp_no;?>"/>	
</table>
<?php 
} 
?>

<?php
//echo "vill" . $_POST['num_src_village'];
if( isset($_POST['num_src_village']) && $_POST['num_src_village']!=0 and $_POST['num_src_village']!=''){
?>

			<table border="0" width="680" id="table5" cellpadding="0" bgcolor="#EEEEEE">
				<tr>
							<td width="167" height="23" align="center" bgcolor="#EEEEEE">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							District Name</font></td>
							<td bgcolor="#EEEEEE" align="center" width="168" rowspan="0">
		 			  <font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Block Name</font></td>
					  <td align="center" width="164" rowspan="0" bgcolor="#EEEEEE">
						<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">
					  Grampanchayt Name</font></td>
							<td height="23" width="171" align="center" bgcolor="#EEEEEE">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Village Name</font></td>
			  </tr>
				<?php
				$no=$_POST['num_src_village'];
				if($no >0 ) {
				for($i=1; $i<=$no; $i++)
				{
				?>
				<tr align="center">
				  <td width="167"><input type="text" name="district_name<?php echo $i;?>" id="district_name<?php echo $i;?>" size="20" class="txt" onkeyup="searchSuggestDistrict(<?php echo $i;?>);" autocomplete="off" ><br />
				<div id="search_suggest<?php echo $i;?>" class="search_suggest">
				</div></td>
				  <td width="168"><input type="text" name="block_name<?php echo $i;?>" id="block_name<?php echo $i;?>" size="20" class="txt" onkeyup="searchSuggestBlock(<?php echo $i;?>);" autocomplete="off" ><br />
				<div id="search_suggest_block<?php echo $i;?>" class="search_suggest">
				</div></td>
				  <td width="164"><input type="text" name="panchayat_name<?php echo $i;?>" id="panchayat_name<?php echo $i;?>" size="20" class="txt" onkeyup="searchSuggestPanchayat(<?php echo $i;?>);" autocomplete="off"  /><br />
				  <div id="search_suggest_panchayat<?php echo $i;?>" class="search_suggest"></div></td>
				  <td width="171"><input type="text" name="village_name<?php echo $i;?>" id="village_name<?php echo $i;?>" size="20" class="txt" onkeyup="searchSuggestVillage(<?php echo $i;?>);" autocomplete="off"  /><br />
				   <div id="search_suggest_village<?php echo $i;?>" class="search_suggest">
				</div></td>
			  </tr>
				<?php 
				}
				}
				?>
				<input type="hidden" name="count_src" id="count_src" value="<?php echo $no;?>"/>		
</table>
<?php }?>
			
<?php
$src_vill = isset($_POST['src_vill'])?$_POST['src_vill']:'';
$type_src= isset($_POST['type_src'])?$_POST['type_src']:'';
$total= isset($_POST['total'])?$_POST['total']:'';
$num_pump= isset($_POST['num_pump'])?$_POST['num_pump']:'';
//for($j=1; $j<=$total; $j++)
//{
	if(isset($_POST['num_pump']) &&  $_POST['num_pump']!=0 && $_POST['num_pump']!='')
	{ 	
	//echo "num_pump--". $num_pump=$_POST['num_pump'.$total]; 
?>
	<table border="0" width="1030" id="table16" cellpadding="0">
       <tr>
	  <!-- <input type="hidden" name="pump_count" id="pump_count" value="<?php //echo $total;?>" />-->
					<td height="21" colspan="6" rowspan="0" align="center" bgcolor="#D7D7FF">
		  			<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Rated</font></td>
					<td bgcolor="#D7D7FF" align="center" rowspan="0" colspan="3">
		  			 <font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Under Operation </font></td>
					 <td bgcolor="#D7D7FF" align="center" rowspan="0" colspan="4">
	  			     <font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Power Measurement</font></td>
</tr>
<tr>
							<td align="center" width="70" bgcolor="#D7D7FF">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Type of pump</font></td>
							<td align="center" width="75" bgcolor="#D7D7FF">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Pump Capacity(HP)</font></td>
							<td align="center" width="70" bgcolor="#D7D7FF">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Discharge m3/hr</font></td>
							<td align="center" width="70" bgcolor="#D7D7FF">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Head (m)</font></td>
							<td align="center" width="70" bgcolor="#D7D7FF">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">Depth of pump (m)</font></td>
							<td align="center" width="159" bgcolor="#D7D7FF">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">Status of pump</font></td>
							<td align="center" width="75" bgcolor="#D7D7FF">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Actual Pump Capacity(HP)</font></td>
							<td align="center" width="70" bgcolor="#D7D7FF">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Actual Discharge m3/hr</font></td>
							<td align="center" width="70" bgcolor="#D7D7FF">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							No. of hrs. of operation(hr/day)</font></td>
							<td width="70" height="32" align="center" bgcolor="#D7D7FF">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Current (amp)</font></td>
							<td width="70" height="32" align="center" bgcolor="#D7D7FF">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Voltage (volt)</font></td>
							<td height="32" width="70" align="center" bgcolor="#D7D7FF">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							PowerFactor</font></td>
							<td height="32" width="83" align="center" bgcolor="#D7D7FF">
							<font style="font-size: 8.5pt" face="Verdana" color="#990000">
							Power Cost(Rs/kw/h)</font></td>
</tr>
		<?php
				//$i=0;
				$no=$_POST['num_pump'];
				for($i=1; $i<=$no; $i++)
				{
		?> 
		<tr align="center">
		<td width="70"><select size=" 1" name="type_pump<?php echo '-'.$i;?><?php echo '-'.$total;?>" id="type_pump<?php echo '-'.$i;?><?php echo '-'.$total;?>" class="txt5" >
                              <option selected value="0">Select</option>
                              <?php 
								foreach($pump as $key=>$val)
								{
		   							echo "<option value=\"$val\">$val</option>";
								}
							?>
          </select></td>
					<td width="75"><input type="text" name="pump_cap<?php echo '-'.$i;?><?php echo '-'.$total;?>" id="pump_cap<?php echo '-'.$i;?><?php echo '-'.$total;?>" size="20" class="txt5" onBlur="float2dec(this)"></td>
		  			<td width="70"><input type="text" name="pump_discharge<?php echo '-'.$i;?><?php echo '-'.$total;?>" id="pump_discharge<?php echo '-'.$i;?><?php echo '-'.$total;?>" size="20" class="txt5" onBlur="float2dec(this)"></td>
		  			<td width="70"><input type="text" name="pump_head<?php echo '-'.$i;?><?php echo '-'.$total;?>" id="pump_head<?php echo '-'.$i;?><?php echo '-'.$total;?>" size="20" class="txt5" onBlur="float2dec(this)"></td>
					<td width="70"><input type="text" name="pump_depth<?php echo '-'.$i;?><?php echo '-'.$total;?>" id="pump_depth<?php echo '-'.$i;?><?php echo '-'.$total;?>" size="20" class="txt5" onBlur="float2dec(this)"></td>
					<td width="159"><font style="font-size: 8.5pt" face="Arial" color="#000000">
					  <input type="radio" name="status_pump<?php echo '-'.$i;?><?php echo '-'.$total;?>" id="status_pump<?php echo '-'.$i;?><?php echo '-'.$total;?>" value="Op" checked="checked" onclick="setEnableufwdrop(this.value,<?php echo $i;?>,<?php echo $total;?>)">Op
	  			  <input type="radio" name="status_pump<?php echo '-'.$i;?><?php echo '-'.$total;?>" id="status_pump<?php echo '-'.$i;?><?php echo '-'.$total;?>" value="Def" onclick="setReadOnlyufwdrop(this.value,<?php echo $i;?>,<?php echo $total;?>)">Def
				   <input type="radio" name="status_pump<?php echo '-'.$i;?><?php echo '-'.$total;?>" id="status_pump<?php echo '-'.$i;?><?php echo '-'.$total;?>" value="Sb" onclick="setReadOnlyufwdrop1(this.value,<?php echo $i;?>,<?php echo $total;?>)">SB</font></td>
		  			<td width="75"><input type="text" name="pump_cap_cons<?php echo '-'.$i;?><?php echo '-'.$total;?>" id="pump_cap_cons<?php echo '-'.$i;?><?php echo '-'.$total;?>" size="20" class="txt5" onBlur="float2dec(this)"></td>
		  			<td width="70"><input type="text" name="discharge_cons<?php echo '-'.$i;?><?php echo '-'.$total;?>" id="discharge_cons<?php echo '-'.$i;?><?php echo '-'.$total;?>" size="20" class="txt5" onBlur="float2dec(this)"/></td>
					<td width="70"><input type="text" name="num_hrs<?php echo '-'.$i;?><?php echo '-'.$total;?>" id="num_hrs<?php echo '-'.$i;?><?php echo '-'.$total;?>" size="20" class="txt5" onBlur="float2dec(this)"></td>			
		  			<td width="70"><input type="text" name="current<?php echo '-'.$i;?><?php echo '-'.$total;?>" id="current<?php echo '-'.$i;?><?php echo '-'.$total;?>" size="20" class="txt5" onBlur="float2dec(this)"></td>
		  			<td width="70"><input type="text" name="voltage<?php echo '-'.$i;?><?php echo '-'.$total;?>" id="voltage<?php echo '-'.$i;?><?php echo '-'.$total;?>" size="20" class="txt5" onBlur="float2dec(this)"></td>
		  			<td width="70"><input type="text" name="power_factor<?php echo '-'.$i;?><?php echo '-'.$total;?>" id="power_factor<?php echo '-'.$i;?><?php echo '-'.$total;?>" size="20" class="txt5" onBlur="float2dec(this)"></td>				
		  			<td width="83"><input type="text" name="kw_unit<?php echo '-'.$i;?><?php echo '-'.$total;?>" id="kw_unit<?php echo '-'.$i;?><?php echo '-'.$total;?>" size="20" class="txt5" onBlur="float2dec(this)"></td>
		</tr>
		<?php  } 
		//$i++;
		?>
		<tr>
				<td height="2" colspan="13" align="center" bgcolor="#D7D7FF"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000"></font></td>
		</tr>      
	<input type="hidden" name="pump_count" id="pump_count" value="<?php echo $no;?>" />
	</table>	
 <?php } //}?>
			
<?php 
if(isset($_POST['num_photo']) && $_POST['num_photo']!=0 and $_POST['num_photo']!='')
{
?>
<table width="514" height="56"  border="0" cellpadding="0" bgcolor="#EEEEEE" id="table7">
	<!--<tr>
		<td width="202" height="22" align="center" bgcolor="#EEEEEE">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Unlisted Habitation Name</font></td>
			<!--<td width="202" height="22" align="center" bgcolor="#EEEEEE">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Longitude</font></td>
			<td width="202" height="22" align="center" bgcolor="#EEEEEE">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Latitude</font></td>
	</tr>-->
	<?php
	//echo $check=$_GET['check'];
$no=$_POST['num_photo'];
if($no>0) 
{
for($i=1; $i<=$no; $i++)
{
?>
	<tr>
		<td width="251" height="23"><font style="font-size: 8.5pt" face="Verdana" color="#000000"><?php echo "Photo".$i;?></font></td>
	  <td width="257" align="center"><input type="file" name="photo_file<?php echo $i;?>" id="photo_file<?php echo $i;?>" value=""></td>
	  <!--<td width="202" align="center">
	  <input type="text" name="un_longitude<?php //echo $i;?>" id="un_longitude<?php //echo $i;?>" size="20" class="txt" onBlur="float1(this)"></td>
	  <td width="202" align="center">
	  <input type="text" name="un_latitude<?php //echo $i;?>" id="un_latitude<?php //echo $i;?>" size="20" class="txt" onBlur="float1(this)"></td>-->
	</tr>	
<?php 
}
}
?>
<input type="hidden" name="countphoto" id="countphoto" value="<?php echo $no;?>"/>
</table>
<?php } ?>

<?php 
if(isset($_POST['num_unhabit']) && $_POST['num_unhabit']!=0 and $_POST['num_unhabit']!='')
{
?>
<table width="191" height="56"  border="0" cellpadding="0" bgcolor="#EEEEEE" id="table7">
	<tr>
		<td width="202" height="22" align="center" bgcolor="#EEEEEE">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Unlisted Habitation Name</font></td>
			<!--<td width="202" height="22" align="center" bgcolor="#EEEEEE">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Longitude</font></td>
			<td width="202" height="22" align="center" bgcolor="#EEEEEE">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Latitude</font></td>-->
	</tr>
	<?php
	//echo $check=$_GET['check'];
$no=$_POST['num_unhabit'];
if($no>0) 
{
for($i=1; $i<=$no; $i++)
{
?>
	<tr>
		<td width="202" align="center">
	  <input type="text" name="un_habit_ufw<?php echo $i;?>" id="un_habit_ufw<?php echo $i;?>" size="20" class="txt"></td>
	  <!--<td width="202" align="center">
	  <input type="text" name="un_longitude<?php //echo $i;?>" id="un_longitude<?php //echo $i;?>" size="20" class="txt" onBlur="float1(this)"></td>
	  <td width="202" align="center">
	  <input type="text" name="un_latitude<?php //echo $i;?>" id="un_latitude<?php //echo $i;?>" size="20" class="txt" onBlur="float1(this)"></td>-->
	</tr>	
<?php 
}
}
?>
<input type="hidden" name="cnt_habit" id="cnt_habit" value="<?php echo $no;?>"/>
</table>
<?php }?>

<?php 
if(isset($_POST['num_unhabit_crit']) && $_POST['num_unhabit_crit']!=0 and $_POST['num_unhabit_crit']!='')
{
?>
<table width="191" height="56"  border="0" cellpadding="0" bgcolor="#EEEEEE" id="table7">
	<tr>
		<td width="202" height="22" align="center" bgcolor="#EEEEEE">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Unlisted Habitation Name</font></td>
			<!--<td width="202" height="22" align="center" bgcolor="#EEEEEE">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Longitude</font></td>
			<td width="202" height="22" align="center" bgcolor="#EEEEEE">
			<font face="Verdana" style="font-size: 8.5pt" color="#990000">Latitude</font></td>-->
	</tr>
	<?php
	//echo $check=$_GET['check'];
$no=$_POST['num_unhabit_crit'];
if($no>0) 
{
for($i=1; $i<=$no; $i++)
{
?>
	<tr>
		<td width="202" align="center">
	  <input type="text" name="un_habit_crit<?php echo $i;?>" id="un_habit_crit<?php echo $i;?>" size="20" class="txt"></td>
	  <!--<td width="202" align="center">
	  <input type="text" name="un_longitude<?php //echo $i;?>" id="un_longitude<?php //echo $i;?>" size="20" class="txt" onBlur="float1(this)"></td>
	  <td width="202" align="center">
	  <input type="text" name="un_latitude<?php //echo $i;?>" id="un_latitude<?php //echo $i;?>" size="20" class="txt" onBlur="float1(this)"></td>-->
	</tr>	
<?php 
}
}
?>
<input type="hidden" name="cnt_habit" id="cnt_habit" value="<?php echo $no;?>"/>
</table>
<?php }?>